if (!isServer) exitWith {};
private ["_x","_deads","_unit","_time"];
_deads = [];
while {true} do {
	{
		if (!alive _x && _x isKindOf "Man") then {
			_unit = _x;
			if ((_deads find _unit) < 0) then {
				_deads set [count _deads, _unit];
				if (d_clean_bodies_weapons > 0) then {
					removeallweapons _unit;
					removeallItems _unit;
					removeBackpack _unit;
					{
						_unit removeMagazine _x;
					} foreach magazines _unit;
				};
				_unit setVariable ["dead_clean", (time + d_clean_bodies_time)];
			} else {
				if (d_clean_bodies_time > 0) then {
					_time = _unit getVariable "dead_clean";
					if (_time < time) then { deleteVehicle _unit; };
				};
			};
		};
		sleep 0.01234;
	} foreach allDead;
	_deads = _deads - [objNull];
	sleep (10 + (random 5));
};